﻿using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using FutureApp.MultiTenancy.Dto;

namespace FutureApp.MultiTenancy
{
    /// <summary>
    /// 租户应用服务
    /// </summary>
    public interface ITenantAppService : IApplicationService
    {
        /// <summary>
        /// 获取租户列表
        /// </summary>
        ListResultDto<TenantEntityDto> GetTenants();

        /// <summary>
        /// 通过 <paramref name="id"/> 获取租户
        /// </summary>
        /// <param name="id">租户ID</param>
        /// <returns>返回租户</returns>
        TenantEntityDto GetTenant(int id);

        /// <summary>
        /// 创建租户
        /// </summary>
        /// <param name="input">参数</param>
        Task CreateTenant(CreateTenantInputDto input);

        /// <summary>
        /// 创建租户
        /// </summary>
        /// <param name="input">参数</param>
        Task UpdateTenant(UpdateTenantInputDto input);

        /// <summary>
        /// 删除租户
        /// </summary>
        /// <param name="input">参数</param>
        Task DeleteTenant(TenantInput input);

        /// <summary>
        /// 启用租户
        /// </summary>
        /// <param name="input">参数</param>
        Task EnableTenant(TenantInput input);

        /// <summary>
        /// 禁用租户
        /// </summary>
        /// <param name="input">参数</param>
        Task DisableTenant(TenantInput input);
    }
}
